<div class="content-box"><!-- Start Content Box -->
    
    <div class="content-box-header">
        
        <h3>Pesquisar Estudantes <?php echo (!empty($total)) ? '(' . $total . ')' : null;?></h3>
        
  		<ul class="content-box-tabs">
            <li><a href="#tab1" class="<?php echo $tab_lista;?>">Pesquisar</a></li> <!-- href must be unique and match the id of target div -->
        </ul>
        
        <div class="clear"></div>
        
    </div> <!-- End .content-box-header -->
    
    <div class="content-box-content">
        
        <div class="tab-content <?php echo $tab_lista;?>" id="tab1"> <!-- This is the target div. id must match the href of this div's tab -->
        
            <form id="formBusca" action="<?php echo site_url('admin/buscar_estudantes/busca');?>" method="post">
			<?php echo form_dropdown('ofertas', $ofertas, $idOferta);?>
				<input class="button" type="submit" value="Pesquisar" />
            </form>
		    <form action="" method="post" id="formLista">
            <table>
                
                <thead>
                    <tr>
                       <th style="width:auto;">Nome</th>
                       <th style="width:auto;">Nome do Curso</th>
                       <th style="width:auto;">Idade</th>
                       <th style="width:auto;">Ano do Curso</th>
                       <th style="width:auto;">Institui&ccedil;&atilde;o de Ensino</th>
                    </tr>
                    
                </thead>
                <tbody>
				<?php
                if (empty($rs)) {
                ?>
                    <tr>
                        <td colspan="5">Clique em pesquisar para executar sua busca.</td>                        
                    </tr>
				<?php
                }
                else {
                
                	foreach ((array)$rs as $registro) {
                    	$id = $registro->id_usuarios;
                ?>
                    <tr>
                        <td><a href="<?php echo site_url('admin/buscar_estudantes/detalhes/' . $id);?>"><?php echo $registro->nome;?></a></td>
                        <td><?php echo $registro->nome_curso;?></td>
                        <td><?php echo $registro->idade;?></td>
                        <td><?php echo $registro->senestre_curso;?></td>
                        <td><?php echo $registro->razao_social;?></td>
                    </tr>
				<?php
                    }
                }
                ?>
                </tbody>
            </table>
            </form>
        </div> <!-- End #tab1 -->
        <div class="tab-content <?php echo $tab_form;?>" id="tab2">
        	
        </div> <!-- End #tab2 -->
    </div> <!-- End .content-box-content -->
</div> <!-- End .content-box -->
<div class="clear"></div>